package com.jinghao.tws.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jinghao.core.common.controller.JingHaoBaseController;
import com.jinghao.tws.service.IWvTaskInfoService;
import com.jinghao.tws.entity.WvCamera;
import com.jinghao.tws.entity.WvTaskInfo;

@Controller
@Scope("prototype")
@RequestMapping(value = "/app/tws/WvTaskInfo")
public class WvTaskInfoController extends JingHaoBaseController<WvTaskInfo> {
	//==================定制内容开始======================
//在这里修改代码
	/**
	 * 查询视频生成情况
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/listWvTaskInfo",method = RequestMethod.GET) 
	public Map<String, Object> listWvTaskInfo(@ModelAttribute("model") WvTaskInfo model){
		this.getWvTaskInfoService().listWvTaskInfo(model);
        return model.getListJson();   
	} 
	
	/**
	 * 删除视频任务生成信息
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/deleteTaskInfo",method = RequestMethod.POST) 
	public Map<String, Object> deleteTaskInfo(@ModelAttribute("model") WvTaskInfo model){
		this.getWvTaskInfoService().deleteTaskInfo(model);;
        return model.getJson();   
	} 
	
	/**
	 * 修改视频任务生成信息
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/updateTaskInfo",method = RequestMethod.POST) 
	public Map<String, Object> updateTaskInfo(@ModelAttribute("model") WvTaskInfo model){
		this.getWvTaskInfoService().updateTaskInfo(model);;
        return model.getJson();   
	} 
	//==================定制内容结束======================

	@Autowired
	public void setWvTaskInfoService(IWvTaskInfoService wvTaskInfoService) {
		super.setIJingHaoBaseService(wvTaskInfoService);
	}

	public IWvTaskInfoService getWvTaskInfoService() {
		return (IWvTaskInfoService) super.getIJingHaoBaseService();
	}
}
